package com.nijie.library.POJO;

import java.util.List;

/**
 * ${DESCRIPTION}
 *
 * @author
 * @create 2017-12-02 21:21
 **/
/***********************************************************
 * 代码意义
 *  1XX：成功
 *  100：保存成功
 *  103：查询数据成功
 *
 *  2XX：失败
 *  201：数据存在
 *  202：数据存储错误
 *  203：未查询到数据
 *
 *  5XX:服务错误
 *  500：服务器内部错误
 */
public class Message<T> {
	//代码
	private String code;
	//信息
	private String msg;
	//数据
	private T data;
	//数据
	private List<T> dataList;

	public String getCode() {return code;}
	public void setCode(String code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public T getData() {return data;}
	public void setData(T data) {this.data = data;}
	public List<T> getDataList() {
		return dataList;
	}
	public void setDataList(List<T> dataList) {
		this.dataList = dataList;
	}

	@Override
	public String toString() {
		return "Message{" +
				"code='" + code + '\'' +
				", msg='" + msg + '\'' +
				", data=" + data +
				", dataList=" + dataList +
				'}';
	}
}
